<template>
	<view class="cart-goods">
		<view class="left">
			<Img :src="goods.giftImage" :customStyle="{width:'130rpx',height:'130rpx'}" />
		</view>
		<view class="right">
			<view class="name u-font-bold u-main-color u-font-26">
				{{goods.giftName}} {{goods.giftSpec}}
			</view>
			<view class="u-flex">
				<view class="tag u-m-r-4">
					赠品
				</view>
				<view class="price">
					￥{{parseFloat(goods.price)}}
				</view>
				<view class="u-m-l-20">
					×{{goods.qty}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import Img from "@/components/goods/img.vue"
	export default{
		components:{ Img },
		props:{
			goods:{
				type:Object
			}
		},
		mounted() {
			console.log(this.goods)
		}
	}
</script>

<style lang="scss" scoped>
	.cart-goods{
		display: flex;
		align-items: center;
		flex: 1;
		.left{
			flex-shrink: 0;
		}
		.right{
			margin-left: 16rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			height: 130rpx;
			flex: 1;
		}
		.tag{
			border: 1rpx solid $u-type-error;
			font-size: 24rpx;
			color: $u-type-error;
			padding: 0 4rpx;
		}
		.price{
			color: $u-type-error;
			font-size: 32rpx;
			text-decoration: line-through;
		}
	}
</style>
